package me.chenjp.tracker.service;


import me.chenjp.tracker.core.funtion.ExampleFunction;

import java.util.List;
import java.util.Optional;

/**
 * @author: Chenjp
 * @description:
 * @create: 2019-03-25 16:19
 */
public interface BaseService<T> {

    Class<?> getParameterizedClass();

    Optional<T> selectByKey(Object key);

    int save(T entity);

    int deleteByPrimaryKey(Object key);

    int updateAll(T entity);

    int delete(T entity);

    int deleteByExample(T entity);

    int updateNotNull(T entity);

    List<T> selectByExample(Object example);

    List<T> selectByExample(ExampleFunction function);

    List<T> select(T var1);

    Optional<T> selectOne(T entity);

    List<T> selectAll();

    int insertSelective(T entity);

    int selectCount(T entity);

    int insertList(List<T> recordList);
}
